public class BookSystem {
    public static void main(String[] args) {
        String[] bookIds = {"8001","8002","8003","8004","8005"};
        String[] bookNames = {"Java编程基础","数据结构与算法","Python入门","数据库原理","计算机网络"};
        boolean[] isBorrowed = {true,false,true,false,true,false,false};

        System.out.println("当前可借阅的图书：");
        int availableCount = 0;
        for (int i = 0; i < bookIds.length; i++) {
            if (!isBorrowed[i]) {
                System.out.println(bookIds[i] + ":" + bookNames[i]);
                availableCount++;
            }
        }

        System.out.println("可借阅图书总数：" + availableCount);

        String returnBookId = "8001";
        for (int i = 0; i < bookIds.length; i++) {
            if (bookIds[i].equals(returnBookId)) {
                isBorrowed[i] = false;
                System.out.println("\n" + returnBookId + "已归还");
                break;
            }
        }


        availableCount = 0;
        for (int i = 0; i < isBorrowed.length; i++) {
            if (!isBorrowed[i]) {
                availableCount++;
            }
        }

        System.out.println("归还后可借阅图书总数：" + availableCount);
    }
}